package com.xiaobai.netease_news.model;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by PiscesQ on 2015/6/25.
 */
public class Video {
    private String cover;	//http://vimg2.ws.126.net/image/snapshot/2015/6/H/1/VARV3B2H1.jpg
    private int length;	//2364
    private String m3u8Url;	//http://flv2.bn.netease.com/tvmrepo/2015/6/B/F/EARTD66BF/SD/movie_index.m3u8
    private String mp4Url;	//http://flv2.bn.netease.com/tvmrepo/2015/6/B/F/EARTD66BF/SD/EARTD66BF-mobile.mp4
    private int playCount;	//58409
    private int playerSize;	//0
    private String pTime;	//2015-06-23 23:52:12
    private String replyBoard;	//documentary_bbs
    private int replyCount;	//9
    private String replyId;	//ARTD6CB2008535RB
    private String title;	//与魔鬼同行：二战英雄被日所俘
    private String vid; //	VARTD6CB2


    public void parseJson(JSONObject root){

        try {
            cover = root.getString("cover");
            length = root.getInt("length");
            m3u8Url = root.optString("m3u8Url");
            mp4Url = root.getString("mp4_url");
            playCount = root.getInt("playCount");
            playerSize = root.getInt("playersize");
            pTime = root.optString("ptime");
            replyBoard = root.getString("replyBoard");
            replyCount = root.getInt("replyCount");
            replyId = root.getString("replyid");
            title = root.getString("title");
            vid = root.getString("vid");

        } catch (JSONException e) {
            e.printStackTrace();
        }
    }


    public String getCover() {
        return cover;
    }

    public int getLength() {
        return length;
    }

    public String getM3u8Url() {
        return m3u8Url;
    }

    public String getMp4Url() {
        return mp4Url;
    }

    public int getPlayCount() {
        return playCount;
    }

    public int getPlayerSize() {
        return playerSize;
    }

    public String getpTime() {
        return pTime;
    }

    public String getReplyBoard() {
        return replyBoard;
    }

    public int getReplyCount() {
        return replyCount;
    }

    public String getReplyId() {
        return replyId;
    }

    public String getTitle() {
        return title;
    }

    public String getVid() {
        return vid;
    }
}
